<template>
  <div>当前count的值为：{{ count  }}</div>
  <button @click="add">点我+1</button>
</template>

<script setup>
import { ref } from 'vue';
const count = ref(1)
const add = (event) => {
  count.value++
  if(count.value % 2 === 0) {
    event.target.style.border = '3px solid black'
  } else {
    event.target.style.border = '3px dashed black'
  }
}
</script>

<style>

</style>